
//
//  MapBaseViewController.m
//  didihaha
//
//  Created by 赵忠鹏 on 2017/8/16.
//  Copyright © 2017年 zhaozhongpeng. All rights reserved.
//

#import "MapBaseViewController.h"

@interface MapBaseViewController ()

@end

@implementation MapBaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    if (IOS7)
    {
        self.automaticallyAdjustsScrollViewInsets = NO;
    }
    
    [self createUI];
}


- (void)createUI{
    self.mapView = [[QMapView alloc] initWithFrame:self.view.bounds];
    self.mapView.showsUserLocation = NO;
    
    [self.view addSubview:self.mapView];
    
    
    
    
}


- (void)mapView:(QMapView *)mapView regionWillChangeAnimated:(BOOL)animated {
    NSLog(@"Region:\ncenter:[%f,%f]\nspan:[%f,%f]",
          _mapView.region.center.latitude,
          _mapView.region.center.longitude,
          _mapView.region.span.latitudeDelta,
          _mapView.region.span.longitudeDelta);\
    
    NSLog(@"最大缩放级别 - %f",_mapView.maxZoomLevel);
    NSLog(@"最小缩放级别 - %f",_mapView.minZoomLevel);
    
}

-(void)mapView:(QMapView *)mapView regionDidChangeAnimated:(BOOL)animated {
    NSLog(@"Region:\ncenter:[%f,%f]\nspan:[%f,%f]",
          _mapView.region.center.latitude,
          _mapView.region.center.longitude,
          _mapView.region.span.latitudeDelta,
          _mapView.region.span.longitudeDelta);
}



@end
